Data

The geojson data comes from the Michigan GIS Open Data Portal.

library(leaflet)
library(RCurl)

geojson = getURL('http://gis-michigan.opendata.arcgis.com/datasets/67a8ff23b5f54f15b7133b8c30981441_0.geojson')

Leaflet Map

This sets up the leaflet map using the Stamen watercolor tiles, markers and geojson data file.

map = leaflet(width="100%") %>% 
    setView(-86, 45, zoom=6) %>%
    addTiles(urlTemplate='http://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png', attribution='Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', ) %>%
    addGeoJSON(geojson, color='#ee0000', weight=2) %>% 
    addCircleMarkers(lng=-84.555, lat=42.732, color='#0000ee', radius=3, label='Lansing', popup='Capital of Michigan') %>%
    addCircleMarkers(lng=-83.045, lat=42.331, color='#00ee00', fill=FALSE, radius=5, weight=1, opacity=1, label='Detroit') %>%
    addCircleMarkers(lng=-84.627, lat=45.868, color='#ee0000', fill=FALSE, radius=10, weight=4, opacity=1, label='Horse Island')